package com.example.lanouhn.bantangapp.activities.activities;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

import com.example.lanouhn.bantangapp.R;

/**
 * Created by lanouhn on 16/8/4.
 */
public class ActivityLand extends Activity {

    private ImageView back;//返回
    private TextView  tv_resgin;//注册
    private TextView  tv_login;//登录
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.msg_land_activity);
        initview();
        initLinstener();
    }

//找到控件
    private void initview() {
       back= (ImageView) findViewById(R.id.back);
        tv_login= (TextView) findViewById(R.id.tv_login);
        tv_resgin= (TextView) findViewById(R.id.tv_resgin);
    }
//点击监听
    private void initLinstener() {
        //返回
        back.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                finish();
            }
        });
        //登录
        tv_login.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent it = new Intent(ActivityLand.this,ActivityLogin.class);
                startActivity(it);
            }
        });
        //注册
        tv_resgin.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent it = new Intent(ActivityLand.this,ActivityResgin.class);
                startActivity(it);
            }
        });
    }
}
